Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes the cacheing for the previously implemented
get_decoder_class
in #1834. While it was probably safe to do this, there are a handful of edge case scenarios in the overall configuration we may have overlooked. By changing the cached methodconvert_type_string
, we avoid the potential edge cases that may result in serious issues down the line.When submitting polkascan/py-scale-codec#117, I discovered these. The utilisation of the
type_registry
means that we should not cache this method.By cacheing
convert_type_string
, we ensure we do not accidentally run into any of these issues, though it does bring our speed improvements down by roughly ⅓ 😞